home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 14 / CU Amiga Magazine's Super CD-ROM 14 (1997)(EMAP Images)(GB)(Track 1 of 3)[!][issue 1997-09].iso / CUCD / Programming / Mesa-2.2 / mklib.freebsd < prev    next >
Encoding:
Text File  |  1997-01-07  |  444 b   |  26 lines

  1. #!/bin/sh
  2.  
  3. # Make a FreeBSD shared library
  4. # contributed by Mark Diekhans <markd@grizzly.com>
  5.  
  6. # First argument is name of output library
  7. # Rest of arguments are object files
  8.  
  9. VERSION="2.2"
  10.  
  11. LIBRARY=$1
  12. shift 1
  13. OBJECTS=$*
  14.  
  15. BASENAME=`echo ${LIBRARY} | sed "s/\.a//g"`
  16. SHLIB=${BASENAME}.so.${VERSION}
  17. STLIB=${BASENAME}.a
  18.  
  19. rm -f ${SHLIB} ${STLIB}
  20.  
  21. ar cq ${STLIB} ${OBJECTS}
  22. ranlib ${STLIB}
  23. ld -Bshareable -o ${SHLIB} ${OBJECTS}
  24.  
  25. mv ${SHLIB} ../lib
  26.